package com.morehair.controller.wx;

import com.morehair.bean.vo.admin.BaseRespVo;
import com.morehair.bean.vo.wx.WxCataLogVo;
import com.morehair.service.wx.WxCataLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author  kkw
 * Date  2021/6/9 10:12
 * Version 1.0
 * Description :
 */
@RestController
@RequestMapping("wx/catalog")
public class WxCataLogController {
    @Autowired
    WxCataLogService wxCataLogService;

    @GetMapping("index")
    public BaseRespVo getCataLog() {
        WxCataLogVo wxCataLogVo=wxCataLogService.getCategory();
        return BaseRespVo.ok(wxCataLogVo);
    }

    @GetMapping("current")
    public BaseRespVo getSubCataLog(Integer id) {
        WxCataLogVo wxCataLogVo=wxCataLogService.getSubCategory(id);
        return BaseRespVo.ok(wxCataLogVo);
    }





}
